import classnames from 'classnames'
type Props = {
  type: string
  className?: string
  onClick?: (e?: React.MouseEvent<SVGSVGElement, MouseEvent>) => void
}

export default function Icon({ type, className, onClick }: Props) {
  return (
    <svg
      className={classnames('icon', className)}
      aria-hidden="true"
      onClick={onClick}
    >
      <use xlinkHref={`#${type}`}></use>
    </svg>
  )
}
